<!--************************************************************ -->
<!--* 文件创建日期：2010                                  * -->
<!--* 文件修改日期：			                                   * -->
<!--************************************************************ -->
<!--JSP初始化设置-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.infomanage.po.*" %>
<%@page import="com.infomanage.vo.*" %>
<%@page import="com.infomanage.util.Consts"%>
<%@page import="com.jiuqi.webtree.util.StringUtils"%>
<%@page import="com.infomanage.service.syscfg.DepartService"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	request.setCharacterEncoding("UTF-8");
	String itemId = request.getParameter("itemId");
	String parent = request.getParameter("parent");
    if(itemId == null) itemId = "";
    
    Department bean = DepartService.loadDeptById(request, response, out);
    String name = "";
    String path = "";
    String latlng = "";
    String telephoneNo = "";
    String adress = "";
    if(bean != null){
    	name = bean.getName();
    	path = bean.getPath();
    	latlng = bean.getLatlng();
    	telephoneNo = bean.getTelephoneNo();
    	adress = bean.getAdress();
    }
%>
<html>
<head>
	<title>单位信息</title>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">	
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
	<link href="../../css/calendar.css" rel="stylesheet" type="text/css">
	<script type="text/javascript">
	   function init() {
		   if("" != "<%=itemId%>") { // 修改
		   }
	   }
	   // 提交
	   function doSubmit(){
		 	if("" == "<%=itemId%>") {
		 		form1.actionType.value = "add";
			}else {
		 		form1.actionType.value = "modify";
			}
		 	form1.submit();
	   }

	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   alert(info);
		   window.returnValue = "ok";
		   window.close();
	   }
	</script>
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0"  onload="init();">
	<form name="form1" action="department_action.jsp" method="post" target="actionFrame">
	<input type="hidden" name="itemId" value="<%=itemId%>">
	<input type="hidden" name="parent" value="<%=parent%>">
	<input type="hidden" name="actionType">
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 表头-->
		<tr class="dialogTableHeader">
			<td>
				单位信息
			</td>
		</tr>
		<!-- 表数据-->
		<tr class="dialogTableContent">
			<td>
				<!-- 数据项 -->
				<table class="dataTable">
					<col width="30%">
					<col width="70%">
					<tr>
						<td class="field">
							单位简称
						</td>
						<td>
							<input name="name" style="width: 100%;" value="<%=name %>"/>
						</td>
					</tr>
					<tr>
						<td class="field">
							单位全称
						</td>
						<td>
							<input name="path" style="width: 100%;" value="<%=path %>"/>
						</td>
					</tr>
					<tr>
						<td class="field">
							经纬度
						</td>
						<td>
							<input name="latlng" style="width: 100%;" value="<%=StringUtils.isEmpty(latlng) ? "" : latlng%>"/>
						</td>
					</tr>
					<tr>
						<td class="field">
							联系电话
						</td>
						<td>
							<input name="telephoneNo" style="width: 100%;" value="<%=StringUtils.isEmpty(telephoneNo) ? "" : telephoneNo %>"/>
						</td>
					</tr>
					<tr>
						<td class="field">
							地址
						</td>
						<td height="130px"> 
							<textarea name="adress" style="width: 100%;height: 100%"><%=StringUtils.isEmpty(adress) ? "" : adress %></textarea>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="tableBtn">
				<span onclick="doSubmit();">确定</span>
				<span onclick="window.close();">取消</span>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				&nbsp;
			</td>
		</tr>
	</table>
	</form>
	<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</body>
</html>